package com.tgy.clickhouse.exception.error;

/**
 * 基础错误类型
 * @author tgy
 * @date 2021/9/2
 */
public class BasicErrorType {

    //系统异常 SE
    public static final BasicErrorType NULLPOINTER_SYSTEM_ERROR = new BasicErrorType("SE001", "空指针异常");
    public static final BasicErrorType METHOD_NOT_FOUND_ERROR = new BasicErrorType("SE002", "方法不存在");
    public static final BasicErrorType METHOD_NOT_SUPPORT_ERROR = new BasicErrorType("SE003", "请求方式不支持");
    public static final BasicErrorType REQUEST_PARAMETER_MISS_ERROR = new BasicErrorType("SE004", "请求参数缺失");
    public static final BasicErrorType MEDIA_TYPE_NOT_SUPPORT_ERROR = new BasicErrorType("SE005", "媒体类型不支持");


    //数据异常 DE
    public static final BasicErrorType SPECIFIC_LEARNWARE_DONT_HAVE_RESOURCE_INDEX_ERROR = new BasicErrorType("DE001", "个性化学件未指定指定资源、指标");

    //网络异常 NE

    //接口异常 AE
    public static final BasicErrorType SUPPORT_QUERY_RES_INDEX_POOL_ERROR = new BasicErrorType("AE001", "查询指标池列表失败");



    public static final BasicErrorType RULE_LIST_RULE_IDS = new BasicErrorType("AE011", "查询规则ID集合失败");





    public static final BasicErrorType ENTITY_GET_DATADICT_CONFIG_LIST_ERROR = new BasicErrorType("AE501", "查询数据字典配置列表失败");



    public static final BasicErrorType AIDETECT_OPENAPI_QUERY_HOST_ANOMALY_INFO_ERROR = new BasicErrorType("AE601", "主机异常检测服务失败");


    public static final BasicErrorType DATA_SYNC_QUERY_PERF_DATA_FROM_CK_ERROR = new BasicErrorType("AE701", "根据资源、指标查询指定性能数据失败");

    public static final BasicErrorType SYSM_CONFIRM_ALARM_ERROR = new BasicErrorType("AE701", "处理告警失败");


    public static final BasicErrorType COMMON_GET_TOKEN_ERROR = new BasicErrorType("AE801", "获取TOKEN失败");


    public static final BasicErrorType DIAGNOSIS_GET_DIAGNOSIS_DETAIL_ERROR = new BasicErrorType("AE901", "通过主键ID获得诊断任务执行记录详情失败");




    //其他异常 OE
    public static final BasicErrorType UNKNOW_ERROR = new BasicErrorType("OE001", "未知错误，请联系管理员");



    private String code;
    private String msg;

    public BasicErrorType(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
